millenniumwaraigisfandomcom-20200223-history
User blog:Ssvb/Event units with non-upgradable defective cost or skill
UPDATE: while it seemed to actually work, restarting with a new copy may be not the most efficient way to get out of a bad CR/SU streak. An unfavorable base cost reduction probability may be actually not a hidden property of a unit, but an account state which may change whenever moving between mincosting different units. So rather than burning valuable copies of the event platinum unit, we may try to CR some iron/bronze/silver units whenever a bad streak is suspected. But this is yet to be confirmed. =Introduction= During the last Fate of the Demonfolk event it happened again. A unit, which just got stuck at the CR-2 level and refused to further reduce cost despite many failed attempts. Belinda Originally I had such a problem during the Belinda's revival from October 2016. Ironically, Belinda only has 3 levels of CR, so mincosting her was supposed to be much easier compared to the usual event units with 5 levels of CR. But moving from CR-2 to CR-3 turned out to be practically impossible She has eaten around 20 copies (!) of herself while at CR-2 and still remained there. You can see this unlucky Belinda unit in the top left corner of the picture. She even got to a 50CC48 level by eating more and more additional copies of herself together with platinum spirits. So how did I get my fully mincosted Belinda from the top right corner? Just around 8-12 hours (!) before the revival was over, I decided that some urgent corrective actions were necessary and tried to raise a fresh new copy of Belinda as a desperate attempt. And it worked. This required 11 SCs to farm 7 new Belinda copies and she mincosted successfully. Such usage of SCs at the last moment was wasteful because some of them had to be spent to refill Charisma. This was far from efficient, but I don't regret it because Belinda is now the primary witch in my team. Fran Now fast forward to the Fran's event. First of all, I have to say that I was very much interested in this particular unit. Khuri is by far my favourite silver unit and having a decent platinum upgrade for her seemed like a very good idea. So it was an intensive week of farming, while gradually spending SCs to refill Stamina and even skipping daily missions in favour of getting more copies of Fran to combine... So, how well did it go? Near the end of the event I had a 50CC49 Fran with 7/10 skill and still CR-2 cost. This involved combining 16 copies together. Out of these, 12 last copies failed to move her from the CR-2 level to CR-3. You can see this copy of Fran in the bottom left corner of the picture. A lot of Platinum Spirits had been also wasted on increasing her EXP level. At this point it was already clear that something went wrong. And again, raising a new copy was also used as the last desperate attempt to fix the situation. Fran has 5 levels of CR, so it makes her a lot harder to mincost than Belinda. Still I did this and even somehow managed to succeed. The resulting Lv47 Fran with 4/10 skill and CR-5 cost is in the right bottom corner of the picture (needed 10 copies to merge). Phew, that was close! I had to spend all my SCs savings, all the SCs earned from 3-starring the event maps and even clear a few 4-star challenges for some more. The total amount of used SCs was around 15. And again, it was a huge waste of resources. So a good question is whether we can do it better. But first of all, we need to have a look at the math involved in the unit mincosting process: =Cost reduction probabilities= The current model The Unit Combination page already gives us the probabilities of cost reduction success for platinum event units: Everything is great and clear, except that there have been multiple reports about extremely unlucky mincosting attempts. One exceptional case was a report about more than 60 failed attempts to do a single cost reduce step (with the expected 25% chance for one trial). So what's the big deal, we have an RNG here and any outcome is possible, right? The trick is that getting 10 failures in a row is not just twice less likely than getting 5 failures in a row, as one could have possibly imagined. In fact because of the Multiplication Rule of Probability, this difference is exponential. If the probability of a single cost reduction failure is 75%, then the probability of 5 cost reduction failures in a row is 0.75 * 0.75 * 0.75 * 0.75 * 0.75 = 0.75 ^ 5 = 0.2373046875 And the probability of 10 failures in a row is 0.75 ^ 10 = 0.0563135147095 And 0.2373046875 / 0.0563135147095 = ~4.2 Basically, every 5 new failed attempts make it more than 4 times less likely for such an outcome to happen just randomly. And as the number of failed cost reduction attempts becomes larger, the probability of having a very long streak of failures becomes extremely low. For example, theoretically there is only roughly 1 in 30 millions chance to observe 60 cost reduction failures in a row. Yet somebody had encountered it and reported this. There were multiple other reports about somewhat less extreme cases (up to 20 failures in a row). An updated model Instead of assuming the "100% -> 50% -> 25% -> 25% -> 25%" cost reduction model with fixed probabilities, we can change it into "100% -> p -> p/2 -> p/2 -> p/2". Where 'p' is a hidden property of a unit, which describes cost reduction difficulty (50% - average, less than 50% - difficult, more than 50% - easy). And then do a software simulation, trying to estimate how many copies are needed for mincosting in different scenarios: #!/usr/bin/env ruby P_MIN = 0.05 P_MAX = 0.95 def simulate_cr(p) copies = 1 while rand >= p copies += 1 end return copies end def simulate_mincosting(wasted_copies, failed_crs_to_give_up, p_min, p_max) total_copies = 1 p = p_min + rand * (p_max - p_min) 1.upto(5) do |step| copies = simulate_cr(case step when 1 then 1 when 2 then p else p / 2 end) total_copies += copies fails = copies - 1 if fails >= (failed_crs_to_give_upstep || Float::INFINITY) wasted_copies += total_copies - copies + failed_crs_to_give_upstep - 1 return simulate_mincosting(wasted_copies, failed_crs_to_give_up, p_min, p_max) end end return wasted_copies + total_copies end def simulate_avg_mincosting(failed_crs_to_give_up, p_min, p_max) copies = 0 n = 100000 n.times do copies += simulate_mincosting(0, failed_crs_to_give_up, p_min, p_max) end copies.to_f / n end best_mincosting = Float::INFINITY best_give_up_strategy = [] 0.upto(3) do |failed_crs_to_give_up_step2| 0.upto(9) do |failed_crs_to_give_up_step3| 0.upto(9) do |failed_crs_to_give_up_step4| failed_crs_to_give_up = {} if failed_crs_to_give_up_step2 > 0 failed_crs_to_give_up2 = failed_crs_to_give_up_step2 end if failed_crs_to_give_up_step3 > 0 failed_crs_to_give_up3 = failed_crs_to_give_up_step3 end if failed_crs_to_give_up_step4 > 0 failed_crs_to_give_up4 = failed_crs_to_give_up_step4 end avg_mincosting = simulate_avg_mincosting(failed_crs_to_give_up, P_MIN, P_MAX) printf("%s %s %s : %.3f\n", (failed_crs_to_give_up2 || "-"), (failed_crs_to_give_up3 || "-"), (failed_crs_to_give_up4 || "-"), avg_mincosting) if avg_mincosting < best_mincosting best_mincosting = avg_mincosting best_give_up_strategy = failed_crs_to_give_up end end end end puts best_give_up_strategy.to_s Results: Some comments about the table above. The 'p' value is either constant 50% or a uniformly distributed random value from 75% and 95% ranges. The program performs 100000 simulations and averages the results. We don't know the actual 'p' value when mincosting a unit, but still can do some guesses and restart with a new unit copy based on them. For example, we can give up on a unit even if a single attempt to do "CR-1 -> CR-2" reduction fails. In this case we lose two unit copies (the base unit still can be used as upgrade fodder), but have a good chance for a better 'p' value when restarting with a different unit sample as a base. The simulation shows that such a trick improves average mincosting resources from ~24.9 copies down to ~16.9 copies (with the assumption that the hidden 'p' value may be anywhere between 5% and 95%). A practical example This is how my final Fran had been mincosted: * Take one unit as a base * Combine it with 2 copies: SU+2 CR-1 (we have failed to do "CR-1 -> CR-2" cost reduction, so abandoning this copy but still use it as a fodder). * Take another unit as a base * Combine it with 2 copies: SU+1 CR-2 (this is good enough, so we continue with this unit). * Combine it with 1 copy: SU+1 CR-1 * Combine it with 1 copy: nothing * Combine it with 1 copy: CR-1 * Combine it with 1 copy: nothing * Combine it with 1 copy: SU+1 CR-1 So it took 10 copies. Two of them were wasted because of a restart. In the end, mincosting was surprisingly fast and easy (it was expected ~16-17 units on average). =Wrapping up= Some people may of course argue that feeding these 10 copies to my initial "unlucky" Fran could also have ended up with a fully mincosted unit. But I strongly doubt this. In fact I even postponed abandoning the "unlucky" Fran as much as possible and wasted a lot of resources because of this. It was kind of like opening a parachute at the very last moment. But if anything like this happens again, I'll be sure to start raising a new copy much sooner next time. Oh, and the last thing. This blog post is all about cost reduction, but the same most likely also applies to upgrading skills. Yes, unit samples with very poorly upgradable skill also exist. Category:Blog posts